package com.example.nutritionmanager.record

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.navigation.compose.rememberNavController
import com.example.nutritionmanager.ui.theme.NutritionManagerTheme
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class NutritionRecordActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            NutritionManagerTheme {
                // 创建一个新的 NavController 用于该 Activity
                NutritionRecordScreen(mealType = intent.getIntExtra("meal_type", MealType.MEAL_TYPE_OTHER))
            }
        }
    }
}
